  
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Create Location</title>         
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list">Location List</g:link></span>
        </div>
        <div class="body">
            <h1>Create Location</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${location}">
            <div class="errors">
                <g:renderErrors bean="${location}" as="list" />
            </div>
            </g:hasErrors>
            <g:form action="save" method="post" >
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='name'>Name:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:location,field:'name','errors')}'>
                                    <input type="text" maxlength='50' id='name' name='name' value="${fieldValue(bean:location,field:'name')}"/>
                                </td>
                            </tr> 
                        
                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='email'>Email:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:location,field:'email','errors')}'>
                                    <input type="text" id='email' name='email' value="${fieldValue(bean:location,field:'email')}"/>
                                </td>
                            </tr> 
                        
                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='homePage'>Home Page:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:location,field:'homePage','errors')}'>
                                    <input type="text" id='homePage' name='homePage' value="${fieldValue(bean:location,field:'homePage')}"/>
                                </td>
                            </tr> 
                        
                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='postReservationPage'>Post Reservation Page:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:location,field:'postReservationPage','errors')}'>
                                    <input type="text" id='postReservationPage' name='postReservationPage' value="${fieldValue(bean:location,field:'postReservationPage')}"/>
                                </td>
                            </tr> 
                        
                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='line1'>Line1:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:location,field:'line1','errors')}'>
                                    <input type="text" maxlength='55' id='line1' name='line1' value="${fieldValue(bean:location,field:'line1')}"/>
                                </td>
                            </tr> 
                        
                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='line2'>Line2:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:location,field:'line2','errors')}'>
                                    <input type="text" maxlength='55' id='line2' name='line2' value="${fieldValue(bean:location,field:'line2')}"/>
                                </td>
                            </tr> 
                        
                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='line3'>Line3:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:location,field:'line3','errors')}'>
                                    <input type="text" maxlength='55' id='line3' name='line3' value="${fieldValue(bean:location,field:'line3')}"/>
                                </td>
                            </tr> 
                        
                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='city'>City:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:location,field:'city','errors')}'>
                                    <input type="text" maxlength='55' id='city' name='city' value="${fieldValue(bean:location,field:'city')}"/>
                                </td>
                            </tr> 
                        
                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='postalCode'>Postal Code:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:location,field:'postalCode','errors')}'>
                                    <input type="text" maxlength='20' id='postalCode' name='postalCode' value="${fieldValue(bean:location,field:'postalCode')}"/>
                                </td>
                            </tr> 
                        
                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='state'>State:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:location,field:'state','errors')}'>
                                    <input type="text" maxlength='55' id='state' name='state' value="${fieldValue(bean:location,field:'state')}"/>
                                </td>
                            </tr> 
                        
                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='country'>Country:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:location,field:'country','errors')}'>
                                    <input type="text" maxlength='2' id='country' name='country' value="${fieldValue(bean:location,field:'country')}"/>
                                </td>
                            </tr> 
                        
                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='account'>Account:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:location,field:'account','errors')}'>
                                    <g:select optionKey="id" from="${Account.list()}" name='account.id' value="${location?.account?.id}" ></g:select>
                                </td>
                            </tr> 
                        
                            <tr class='prop'>
                                <td valign='top' class='name'>
                                    <label for='phoneNumber'>Phone Number:</label>
                                </td>
                                <td valign='top' class='value ${hasErrors(bean:location,field:'phoneNumber','errors')}'>
                                    <input type="text" id='phoneNumber' name='phoneNumber' value="${fieldValue(bean:location,field:'phoneNumber')}"/>
                                </td>
                            </tr> 
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><input class="save" type="submit" value="Create"></input></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
